#include <iostream>
#include <fstream>
#include <vector>
#include "adapt_prec_arith.h"
#include "cell.h"

int main()
{

	//std::istream & in = std::cin;
	//std::ostream & out = std::cout;

	std::ifstream in("in.txt");
	std::ofstream out("out.txt");

	double x1, y1, x2, y2;
	in >> x1 >> y1 >> x2 >> y2;

	if (x2 < x1)
	{
		std::swap(x2,x1);
		std::swap(y2,y1);
	}

	std::vector<cell> answer;
	cell cur = cell(std::floor(x1), std::floor(y1));
	cell end = cell(std::floor(x2), std::floor(y2));

	if (y1 <= y2)
	{		
		answer.push_back(cur);
		while (cur != end)
		{
			cell t = cell(cur.x + 1, cur.y + 1);
			int turn = t.left_turn_for_cell(x1, y1, x2, y2);
			if (turn >= 0)
				cur.x++;
			if (turn <= 0)
				cur.y++;
			answer.push_back(cur);
		}

		out << answer.size() << '\n';
		for (auto i = answer.begin(); i < answer.end(); i++)
			out << (*i).x << " " << (*i).y << '\n';
	}
	else
	{
		std::vector<cell> stack;
		stack.push_back(cur);
		while (cur != end)
		{
			cell t = cell(cur.x + 1, cur.y);
			int turn = t.left_turn_for_cell(x1, y1, x2, y2);
			if (turn > 0)
				cur.y--;
			else
			{
				cur.x++;
				for (auto i = stack.rbegin(); i < stack.rend(); i++)
					answer.push_back((*i));
				stack.clear();
			}
			stack.push_back(cur);
		}

		out << answer.size() + stack.size() << '\n';
		for (auto i = answer.begin(); i < answer.end(); i++)
			out << (*i).x << " " << (*i).y << '\n';
		for (auto i = stack.rbegin(); i < stack.rend(); i++)
			out << (*i).x << " " << (*i).y << '\n';
	}

	return 0;
}